import StructureCache from '@/modules/structureCache'

/**
 * 获取房间中建筑
 * @param room 要获取建筑的房间，房间可见则直接获取，不可见则从缓存中读取
 * @param time 缓存时间，默认1000
 */
export function getStructures(room: Room | string, time = 1000) {
    if (typeof room === 'string') return StructureCache.getStructuresFromCache(room, time)
    return StructureCache.getStructures(room, true)
}
